package org.example.goods.api;

import org.example.commons.ApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(name = "goods-service", fallbackFactory = ItemFeignClientFallbackFactory.class)
public interface ItemFeignClient {

    @PostMapping("getItem")
    ApiResponse<ItemResponse> getItem(@Valid @RequestBody ItemRequest request);

}
